package com.heima.utils.thread;

/**
 * @author 陈辉
 * @data 2023 10:57
 */

public class WeMediaThreadLocalUtil {
    private static final ThreadLocal<Integer> tl = new ThreadLocal<>();


    //存数据
    public static void set(Integer id){
        tl.set(id);
    }

    //取数据
    public static Integer get(){
        return tl.get();
    }

    //清除数据
    public static void clear(){
        tl.remove();
    }
}
